import request from '@/utils/request'
// 获取部门列表
export function fetchDepartmentList() {
  return request({
    url: '/company/department',
    method: 'GET'
  })
}
// 获取部门负责人列表
export function fetchManagerList() {
  return request({
    url: '/sys/user/simple',
    method: 'GET'
  })
}
// 新增部门
export function fetchAddDepart(data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data: data

  })
}
// 删除
export function delDepartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
// 获取详情
export function getDepartDetail(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'GET'
  })
}
// 更新详情
export function fetchUpdateDepart(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}
